function update_note() {
    var url = '/note/save';
    var params = {
        id:          getElement('id').value,
        title:       getElement('title_input').value,
        notes:       getElement('notes_input').value,
        tg_format:   'json'
    };
    var data = queryString(params);

    function update_note_callback(result) {
        result = evalJSONRequest(result);
        if (result['success'] == true) {
            getElement('notes_content').innerHTML = result['notes'];
            getElement('title').innerHTML = result['title'];
            new Effect.Highlight('title');
        }
    }

    var req = getXMLHttpRequest();
    req.open('POST', url, true);
    req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8;');
    sendXMLHttpRequest(req, data).addCallback(update_note_callback);
}
